<template>
    <div class="service">
        <div class="service_item">
            <el-popover
                    placement="left"
                    width="200"
                    trigger="hover">
                <svg-icon icon-class="wechat" slot="reference"></svg-icon>
                <slot><img src="../../assets/ee4eca451d56000.jpg" alt="" style="height: 100%;width: 100%"></slot>
            </el-popover>
        </div>
        <div class="service_item">
            <el-popover
                    placement="left"
                    width="200"
                    trigger="hover"
                    :content="currency"
            >
                <svg-icon icon-class="money" slot="reference"></svg-icon>
            </el-popover>
        </div>
        <div class="service_item">
            <el-popover
                    placement="left"
                    width="200"
                    trigger="hover"
                    :content="all.phone"
            >
                <svg-icon icon-class="phone" slot="reference"></svg-icon>
            </el-popover>
        </div>
        <div class="service_item" @click="removeToken()">
            <el-popover
                    placement="left"
                    width="200"
                    trigger="hover"
                    content="点击退出"
                    color="red"
            >
                <svg-icon icon-class="esc" tag="button" slot="reference" style="font-size: 20px"></svg-icon>
            </el-popover>

        </div>
    </div>
</template>

<script>
  import { mapGetters } from 'vuex'
  import { removeToken } from '../../utils/auth'

  export default {
    name: 'index',
    methods: {
      removeToken() {
        removeToken()
      }
    },
    computed: {
      ...mapGetters([
        'currency',
        'all'

      ])
    }
  }
</script>

<style scoped>
    .service {
        width: 2vmax;
        position: fixed;
        right: 0;
        top: calc(100vh / 3 - 2vmax);;
        text-align: center;
        z-index: 9999999999999;

    }

    .service .service_item {
        padding-top: 1vmax;
        padding-bottom: 1vmax;
        cursor: pointer;
    }

</style>
